﻿@model ScrumTracker.Models.Sprint
@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_Layout5.cshtml";
}
@if (false)
{
    <script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" style="overflow: hidden;">
    <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
            <a href="@Url.Action("Stories", "Sprints", new { @id = Model.SprintId })">Stories</a></li>
        <li class="ui-state-default ui-corner-top">
            <a href="@Url.Action("Edit", "Sprints", new { @id = Model.SprintId })">Edit</a></li>
    </ul>
    <div class="ui-tabs-panel ui-widget-content ui-corner-bottom">
        @{
            var grid = new WebGrid(Model.Stories.Where(s => s.SprintId == null).OrderByDescending(s => s.Priority).ThenBy(s => s.Effort), canSort: false, canPage: false);
            @grid.GetHtml(
            columns:
                grid.Columns(
                grid.Column(format: @<a href="@Url.Action("Get", "Stories", new { @id = item.IssueId })">Story #@item.IssueId</a>),
                    grid.Column("Description"),
                    grid.Column("Priority"),
                    grid.Column("Effort")
                ),
                tableStyle: "table-issues",
                headerStyle: "ui-widget-header"
            )
        }
    </div>
</div>
@*<div id="tabs" style="margin: 0; overflow: hidden;">
    <ul>
        <li>
            <a href="#stories">Stories</a></li>
        <li>
            <a href="#edit">Edit</a></li>
    </ul>
    <div id="stories">
        @{
            var grid = new WebGrid(Model.Stories.Where(s => s.SprintId == null).OrderByDescending(s => s.Priority).ThenBy(s => s.Effort), canSort: false, canPage: false);
            @grid.GetHtml(
            columns:
                grid.Columns(
                grid.Column(format: @<a href="@Url.Action("Get", "Stories", new { @id = item.IssueId })">Story #@item.IssueId</a>),
                    grid.Column("Description"),
                    grid.Column("Priority"),
                    grid.Column("Effort")
                ),
                tableStyle: "table-issues",
                headerStyle: "ui-widget-header"
            )
        }
    </div>
    <div id="edit">
        general</div>
</div>*@
<div style="clear: both;">
</div>
